package org.example.spring_frist.LibraryProject.model;

import lombok.Data;

@Data
public class bookInfo {
    private Integer id;
    private String name;
    private String author;
    private Integer count;
    private Integer price;
    private String publisher;
    private Integer state;//1 可借阅  2 不可借阅
    private String stateCN;

    public void setState(Integer state) {
        this.state = state;
        stateCN = state == 1 ? "可借阅" : "不可借阅";
    }

    private void setStateCN() {

    }
}
